"""
@Project:p8项目
@File:model_filter.py
@Author:柴奇峰
@Date:11:32
"""
from flask_restful import fields

# 用户信息
user_fields = {
    "uid": fields.Integer,
    'uname':fields.String,
    "account": fields.String,
    "password": fields.String,
    "mobile": fields.String,
    "create_time": fields.String,
    "profile_photo": fields.String,
    'gender':fields.Integer,
    'vip':fields.Integer,
    'vip_expiration':fields.String
}

courseTag_fields ={
    'tag_name':fields.String,
    'sequence':fields.Integer
}


course_fields = {
    "id" : fields.Integer,
    'course_name':fields.String,
    'course_status':fields.Integer,
    'course_img':fields.String,
    'attention':fields.Integer,
    'course_introduce':fields.String,
    'learner':fields.Integer,
    'course_type':fields.String
}

course_type_fields = {
    "id" : fields.Integer,
    "name" : fields.String,
}

chapter_fields = {
    "id" : fields.Integer,
    "title" : fields.String,
    "serial_num" : fields.Integer,
    "course_type" : fields.Integer,
}

# 课程的小节
section_fields = {
    "id" : fields.Integer,
    "section_title" : fields.String,
    "chapter" : fields.Integer,
    "serial_num" : fields.Integer,
    "learn_time" : fields.Float,
    "video_url" : fields.String,
    "like" : fields.Integer,
}

# 评论表
comments_fields = {
    "id" : fields.Integer,
    "user" : fields.Integer,
    "course" : fields.Integer,
    "comment_time" : fields.String,
    "comment_content" : fields.String,
    "zan_num" : fields.Integer,
    "parent_id" : fields.Integer,
    "reply_count" : fields.Integer,
}

# vip
vip_fields = {
    # 'level':fields.Integer,
    'price':fields.Float,
    'vip_cour':fields.Integer,
    'exempt_cour':fields.Integer,
    'save':fields.Integer,
    'environment': fields.Integer,
    'client':fields.Integer,
    'ssh':fields.Integer,
    "web_ide":fields.Integer,
    'discounts':fields.Integer,
    'exempt_study':fields.Integer
}
